<?php


namespace app\model;

use think\facade\Db;
use think\Model;

class ViidDeviceType extends Model {
    public function addChildren($all, array $getParentsIds)   {
        $_relate=new ViidDeviceRelate();
        $_relate->saveAll($all);
        Db::name('viid_device_type')->where('id','in',$getParentsIds)->inc('count',count($all))->update();
    }
}